package com.config.demo.controller;

import com.config.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class UserController {

    //注入配置类
    @Autowired
    private User user;

    @ResponseBody
    @GetMapping("get")
    public User get() {

        return user;
    }

}
